package org.example.huadianguanli.entity;

import com.alibaba.fastjson2.JSONArray;
import org.example.core.annotation.Field;
import org.example.core.annotation.Table;
import org.example.core.entity.SimpleEntity;
import org.example.core.mysql.convert.DoubleToBigDecimalConvert;
import org.example.core.mysql.convert.JSONArrayToStringConvert;

/**
 * Description:
 * Date: 2024/2/14 13:14
 */
@Table(value = "t_shop", orderBy = "update_time desc")
public class TShopEntity extends SimpleEntity {
    private String name;
    private String type;
    @Field(alias = "price", convert = DoubleToBigDecimalConvert.class)
    private double price;
    @Field(alias = "discount", convert = DoubleToBigDecimalConvert.class)
    private double discount;

    @Field(alias = "shop_img", convert = JSONArrayToStringConvert.class)
    private JSONArray shopImg;

    @Field(alias = "storage_id")
    private String storageId;

    public String getStorageId() {
        return storageId;
    }

    public void setStorageId(String storageId) {
        this.storageId = storageId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public JSONArray getShopImg() {
        return shopImg;
    }

    public void setShopImg(JSONArray img) {
        this.shopImg = img;
    }
}
